
#define DIB_LOAD_FILE_FROM_RESOURCE

#ifdef DIB_LOAD_FILE_FROM_RESOURCE

class CDib
{
protected:
	LPBYTE	lpBits;
	int cx,cy;
public:
	CDib(){lpBits = NULL;}
	~CDib();
	UINT GetDibHeight();
	UINT GetDibWidth();
	BYTE* GetDibBitsPtr();
	BOOL LoadBitmapFile(const char* fileName);
};

#else

class CDib
{
public:
	BYTE* GetDibBitsPtr();
	LPBITMAPINFO GetDIbInfoPtr();
	LPBITMAPINFOHEADER GetDibInfoHeaderPtr();
	UINT GetDibHeight();
	UINT GetDibWidth();
	DWORD GetDibSizeImage();
	CDib();
	BOOL LoadBitmapFile(const char* fileName);
	CDib(const char* fileName);
	virtual ~CDib();

protected:
	LPBITMAPFILEHEADER	m_pBmFileHeader;
	LPBITMAPINFO		m_pBmInfo;
	LPBITMAPINFOHEADER	m_pBmInfoHeader;
	RGBQUAD*			m_pRGBTable;
	BYTE*				m_pDibBits;
	UINT				m_numColors;
};

#endif


